package com.lyne.test.rabbit;

import org.springframework.amqp.core.DirectExchange;
import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;

/**
 * @author lyne
 */
public class RibbonConfig {

    @Bean
    public DirectExchange fanoutExchange() {
        return new DirectExchange("material.test", true, false);
    }

    //2.声明队列
    @Bean
    public Queue smsQueue() {
        return new Queue("material.test.queue", true);
    }

    //3.完成绑定关系（队列和交换机完成绑定关系）

//    @Bean
//    public Binding smsBing() {
//        return BindingBuilder.bind(smsQueue()).to(fanoutExchange()).with("sms");
//    }

}
